<template>
  <div class="app-container">
    <div class="head-container">
      <el-form :inline="true" class="demo-form-inline">
        <el-form-item label="咨询人">
          <el-input v-model="searchForm.quizzer" placeholder="咨询人" />
        </el-form-item>
        <el-form-item label="咨询内容">
          <el-input
            v-model="searchForm.context"
            placeholder="咨询内容"
          />
        </el-form-item>
        <el-form-item label="回复状态">
          <el-select v-model="searchForm.replyStatus" placeholder="活动区域">
            <el-option label="全部" value="" />
            <el-option label="已回复" value="1" />
            <el-option label="未回复" value="0" />
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary">查询</el-button>
        </el-form-item>
      </el-form>
    </div>
    <!--表格渲染-->
    <el-table :data="tableData" border style="width: 100%">
      <el-table-column type="index" label="序号" :index="indexMethod" align="center" />
      <el-table-column v-if="false" prop="id" label="ID" width="250" header-align="center" />
<!--      <el-table-column prop="title" label="标题" width="150" header-align="center" show-overflow-tooltip />-->
      <el-table-column prop="context" label="内容" header-align="center" show-overflow-tooltip />
      <el-table-column prop="questionType" label="类型" width="150" align="center" />
      <el-table-column prop="quizzer" label="咨询人" width="150" align="center" />
      <el-table-column prop="phone" label="联系方式" width="150" align="center" />
      <el-table-column prop="qtime" label="咨询时间" width="150" align="center" />
      <el-table-column prop="dtime" label="指派时间" width="150" align="center" />
    </el-table>

    <el-pagination
      :current-page="pagination.currentPage"
      :page-sizes="[30, 50, 300, 400]"
      :page-size="pagination.pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="pagination.total"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>

export default {
  components: {
  },
  data() {
    return {
      searchForm: {
        quizzer: '',
        replyName: '',
        context: '',
        replyStatus: ''
      },
      tableData: [],
      pagination: {
        currentPage: 1,
        pageSize: 30,
        total: 0
      }
    }
  },
  methods: {
    indexMethod(index) {
      return index + 1
    },
    // 改变分页大小
    handleSizeChange(val) {
      this.pagination.pageSize = val
    },
    // 改变页码
    handleCurrentChange(val) {
      this.pagination.currentPage = val
    }
  }
}
</script>

